let Koa = require('koa');
let Router = require('koa-router');

let app = new Koa(),
router = new Router(),
ctrls = ["./user"];
for(let c of ctrls){
  let initFunc = require(c);
  if(initFunc){
    initFunc(router);
  }
}
const session = require('koa-session')
const convert = require('koa-convert');
app.keys = ['some secret hurr'];
app.use(convert(session(app)));


app.use(router.routes()).use(router.allowedMethods());
app.listen(3000);
